/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package geometry;

/**
 *
 * @author daniel
 */
public class Basis
{
    private Vector3D Vector1;
    private Vector3D Vector2;
    private Vector3D Vector3;
    
    public Basis()
    {
       Vector1 = new Vector3D(1,0,0);
       Vector2 = new Vector3D(0,1,0);
       Vector3 = new Vector3D(0,0,1);
    }
    
    public Basis(Vector3D aVector1, Vector3D aVector2, Vector3D aVector3)
    {
       Vector1 = aVector1;
       Vector2 = aVector2;
       Vector3 = aVector3;
    }
        
    
    public static Basis CreateBasis(Vector3D aVector1, Vector3D aVector2)
    {
       Vector3D aVector1norm = aVector1.getUnitVector();
       Vector3D aVector2norm = aVector2.getUnitVector();
       Vector3D aVector3norm = GeometryMath.crossProduct(aVector1norm, aVector2norm).getUnitVector();
       
       return new Basis(aVector1norm,aVector2norm,aVector3norm); 
    }
    
    public void setCanonicalBasis()
    {
       Vector1 = new Vector3D(1,0,0);
       Vector2 = new Vector3D(0,1,0);
       Vector3 = new Vector3D(0,0,1);
    }

    public Vector3D getVector1()
    {
        return Vector1;
    }

    public void setVector1(Vector3D Vector1)
    {
        this.Vector1 = Vector1;
    }

    public Vector3D getVector2()
    {
        return Vector2;
    }

    public void setVector2(Vector3D Vector2)
    {
        this.Vector2 = Vector2;
    }

    public Vector3D getVector3()
    {
        return Vector3;
    }

    public void setVector3(Vector3D Vector3)
    {
        this.Vector3 = Vector3;
    }
    
}
